package jin.courses.jan06;

public class Person {
	//先找共性，再找差异
	
//	教室里有6个人
	
//	属性（是静态的）：    分析差异：性别，年龄，身高，体重，头发长短，性格，爱好，指纹（唯一）
	
	char sex;
	short age;
	float height;
	double weight;
	char hair;
	String style;
	String interest;
	String finger_print;
	String name;
	
	
//	分析动态的功能     （对应类里的方法）：写代码，说话，吃饭，做饭，买菜，睡觉  
	
//	方法格式：返回数据类型 方法名字（输入参数的类型   输入参数的名字，......）{//return 返回的值}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public char getSex() {
		return sex;
	}
	public void setSex(char sex) {
		this.sex = sex;
	}
	public short getAge() {
		return age;
	}
	public void setAge(short age) {
		this.age = age;
	}
	public float getHeight() {
		return height;
	}
	public void setHeight(float height) {
		this.height = height;
	}
	public double getWeight() {
		return weight;
	}
	public void setWeight(double weight) {
		this.weight = weight;
	}
	public char getHair() {
		return hair;
	}
	public void setHair(char hair) {
		this.hair = hair;
	}
	public String getStyle() {
		return style;
	}
	public void setStyle(String style) {
		this.style = style;
	}
	public String getInterest() {
		return interest;
	}
	public void setInterest(String interest) {
		this.interest = interest;
	}
	public String getFinger_print() {
		return finger_print;
	}
	public void setFinger_print(String finger_print) {
		this.finger_print = finger_print;
	}
	String coding(String compute){
		return "一段代码";
	}
	void say(String content){
		System.out.println(name+" 说: "+content);//★★☆★
	}

	
	//构造方法不能有返回值，void也不行
	Person(){
		
		System.out.println("这个是我们自己写的构造方法");
	}
	Person(String finger_print){
		//this代表当前对象
		this.finger_print=finger_print;
		
		System.out.println("这个人的指纹是"+finger_print);
	}
	
}
